# -*- coding: utf-8 -*-
# @Time: 2021/5/12 21:52
# @Author: moxinqian
# @Contact: tel 18382469064
# @File: demo-selenium-qq.py
# @DESC: 实现模拟qq邮箱

from selenium import webdriver
from time import sleep
#主站
host = "https://mail.qq.com/"

#浏览器缓存目录
profile_dir = r"C:\Users\97755\AppData\Roaming\Mozilla\Firefox\Profiles\67venck1.default"
firefox_profile = webdriver.FirefoxProfile(profile_dir)

#配置项
options = webdriver.FirefoxOptions()
#静默的方式打开浏览器
#options.add_argument("--headless")
driver = webdriver.Firefox(executable_path="firefox_driver/geckodriver_28.exe",
                           firefox_profile=firefox_profile,
                            firefox_options=options)

# 进入链接
driver.get(host)

sleep(3)

print(driver.title)

